package com.pb.wkflow.api.mapper;

import com.pb.wkflow.api.entity.TaskCountEntity;
import com.pb.wkflow.api.entity.TodoTaskEntity;
import com.pb.wkflow.api.query.TodoTaskQuery;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * 待办任务查询服务
 * @author 苗益辉
 * @date 2022/5/18 15:16
 */
@Mapper
@Repository
public interface TodoTaskMapper {

    /**
     * 分页查询待办
     * @param query 查询条件
     * @return List
     */
    List<TodoTaskEntity> findTodoList(TodoTaskQuery query);

    /**
     * 查询待办数量
     * @param query 查询条件
     * @return long
     */
    long findTodoListCount(TodoTaskQuery query);

    /**
     * 查询各流程键值对应的待办数量
     * @param query query
     * @return List<TaskCountEntity>
     */
    List<TaskCountEntity> countProcDefKey(TodoTaskQuery query);
}
